package com.codefish.codefishseckill.mapper;

import com.codefish.codefishseckill.entity.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.codefish.codefishseckill.utils.model.PageInfo;
import com.codefish.codefishseckill.vo.GoodsVO;

import com.codefish.codefishseckill.vo.SecGoodsDetailVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author codefish
 * @since 2022-07-07
 */
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {
    /**
     * 查询所有商品信息
     *
     * @return 商品信息列表
     */
    List<GoodsVO> listAllGoodsInfo(PageInfo pageInfo);

    Integer getAllGoodsCount();

    /**
     * 根据商品编号获取秒杀信息
     * @param id 商品编号
     * @return 秒杀商品信息
     */
    SecGoodsDetailVO getSecGoodsById(Long id);

}
